﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace PositiveIntegerExtractor
{
    class Program
    {
        static void Main()
        {
            string pattern = @"\A\s*([+]?0|([-+]?[1-9][0-9]*))\s*\Z";
            string[] numbers = { "154", "45654", "00015", "-056", "-5955465", "+65006", "-0", "+0", "+05", "0" };

            Regex regex = new Regex(pattern);
            foreach (string number in numbers)
            {
                if (regex.IsMatch(number) == true)
                {
                    Console.WriteLine(number);
                }
            }
        }
    }
}
